package com.aaa.controller.sas;

import com.aaa.controller.BaseController;
import com.aaa.entity.Result;
import com.aaa.entity.sas.TestResultSasTotal;

import com.aaa.service.sas.TestResultSasService;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.servlet.ModelAndView;

import java.util.List;

/**
 * @author ：
 * @date ：Created in 2022/9/5 16:22
 * @description：
 * @modified By：
 * @version:
 */
@RestController
@RequestMapping("sasLastController")
public class SasLastController extends BaseController {
    @Autowired
    TestResultSasService testResultSasService;

    @RequestMapping("queryAllResultSas.do")
    public Result queryAllResultSas(){
        List<TestResultSasTotal> list = testResultSasService.queryAllResultSas();
        for (TestResultSasTotal testResultSasTotal : list) {
            return  success(testResultSasTotal);
        }
        return fail();
    }

    @RequestMapping("sasLast.do")
    public ModelAndView sdsLast(ModelAndView modelAndView){
        modelAndView.setViewName("sas/SasLast");
        return  modelAndView;
    }
}
